/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.app.topic.comment.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 评论表Entity
 * @author zpp
 * @version 2020-02-03
 */
@Table(name="t_topic_comment", alias="a", columns={
		@Column(name="id", attrName="id", label="主键", isPK=true),
		@Column(name="topic_id", attrName="topicId", label="话题的主键"),
		@Column(name="commentator", attrName="commentator", label="评论人id"),
		@Column(name="commentator_pic", attrName="commentatorPic", label="评论人的头像"),
		@Column(name="comment_content", attrName="commentContent", label="评论内容"),
		@Column(includeEntity=DataEntity.class),
		@Column(name="like_num", attrName="likeNum", label="点赞量"),
		@Column(name="nick_name",attrName="nickName",label="昵称"),
		@Column(name="avatar_url",attrName="avatarUrl",label="头像"),
	}, orderBy="a.update_date"
)
public class AppTopicComment extends DataEntity<AppTopicComment> {
	
	private static final long serialVersionUID = 1L;
	private String topicId;		// 话题的主键
	private String commentator;		// 评论人id
	private String commentatorPic;		// 评论人的头像
	private String commentContent;		// 评论内容
	private Integer likeNum;		// 点赞量
	private Integer likeYesNo=0;//是否点赞
	private String nickName;
	private String avatarUrl;
	
	public Integer getLikeYesNo() {
		return likeYesNo;
	}

	public void setLikeYesNo(Integer likeYesNo) {
		this.likeYesNo = likeYesNo;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getAvatarUrl() {
		return avatarUrl;
	}

	public void setAvatarUrl(String avatarUrl) {
		this.avatarUrl = avatarUrl;
	}

	public AppTopicComment() {
		this(null);
	}

	public AppTopicComment(String id){
		super(id);
	}
	
	@Length(min=0, max=50, message="话题的主键长度不能超过 50 个字符")
	public String getTopicId() {
		return topicId;
	}

	public void setTopicId(String topicId) {
		this.topicId = topicId;
	}
	
	@Length(min=0, max=50, message="评论人id长度不能超过 50 个字符")
	public String getCommentator() {
		return commentator;
	}

	public void setCommentator(String commentator) {
		this.commentator = commentator;
	}
	
	@Length(min=0, max=100, message="评论人的头像长度不能超过 100 个字符")
	public String getCommentatorPic() {
		return commentatorPic;
	}

	public void setCommentatorPic(String commentatorPic) {
		this.commentatorPic = commentatorPic;
	}
	
	@Length(min=0, max=1000, message="评论内容长度不能超过 1000 个字符")
	public String getCommentContent() {
		return commentContent;
	}

	public void setCommentContent(String commentContent) {
		this.commentContent = commentContent;
	}
	
	public Integer getLikeNum() {
		return likeNum;
	}

	public void setLikeNum(Integer likeNum) {
		this.likeNum = likeNum;
	}
	
}